<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo ''?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php echo $this->set_css('managecp.css', 'admin');?>" type="text/css" media="all" />
<script language="javascript" type="text/javascript" src="<?php echo $this->set_js('jquery.js');?>"></script>
<script language="javascript" charset="utf-8" type="text/javascript" src="<?php echo $this->set_js('editor/kindeditor.js');?>"></script>
<script language="javascript" charset="utf-8" type="text/javascript" src="<?php echo $this->set_js('editor/wind_c_editor.js');?>"></script>
<script> 
		KE.webUrl = '';
		KE.show({
			id : 'content1',
			shadowMode : false,
			autoSetDataMode: false,
			allowPreviewEmoticons : false,
			afterCreate : function(id) {
				if (!KE.isEmpty(id))
				{
					html_encode = KE.html(id);
					html_encode = codetohtml(html_encode);
					KE.html(id, html_encode);
				}
				KE.event.add(KE.$('content'), 'submit', function() {
					html_encode = KE.html(id);
					html_encode = htmltocode(html_encode);
					KE.html(id, html_encode);
					KE.util.setData(id);
				});
			} ,

		});
</script> 
<meta content="Comsenz Inc." name="Copyright" />
</head>
<body scroll="no">
<div class="container">
    <h3><a href="<?php echo $this->set_url('content', 'content', 'index');?>">内容列表</a> 添加内容</h3>
 		<form id="content" action="<?php echo $this->set_url('content', 'content', 'add', array('opt'=>!isset($opt)?'insert':$opt));?>" method="post">
			<table class="datalist fixwidth" style="width:100%;">
				<tr>
					<td style="width:5px;">分类：</td>
					<td align="left">
					<select name="category">
					<?php foreach ($category_list as $key=>$val):?>
					<option value="<?php echo $val['id']?>" <?php if (isset($category['id']) && $val['id'] == $category['parentid']): ?>selected="selected"<?php endif;?>><?php echo $val['name']?></option>
					<?php endforeach;?>
					</select>

					</td>
				</tr>
				<tr>
					<td style="width:5px;">标题：</td>
					<td align="left"><input type="text" id="title" name="title" value="<?php echo isset($category['name'])?$category['name']:'' ?>" style="width:700px;"></td>
				</tr>
				<tr>
					<td style="width:5px;">摘要：</td>
					<td align="left"><textarea id="summary" name="summary" style="width:700px;height:50px;"></textarea> </td>
				</tr>
				<tr>
					<td style="width:5px;">内容：</td>
					<td align="left"> 
					<textarea id="content1" name="content1" style="width:700px;height:400px;visibility:hidden;"></textarea> 
					</td>
				</tr>
				<tr>
					<td style="width:5px;">标签：</td>
					<td align="left"><input type="text" id="tags" name="tags" value="" style="width:700px;"> </td>
				</tr>
				<tr class="nobg">
					<td>
					<input type="hidden" value="<?php echo isset($category['id'])?$category['id']:0?>" name="id"/>
					<input type="submit" value="提 交" class="btn" /></td>
				</tr>
				
			</table>
		</form>
    </div>
    
</div>
</body>
</html>
